<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="js/jquery-3.7.1.js"></script>
</head>
<body>

<button onclick="sendGet()" >点击发送get请求</button>
<div id="result"></div>
<script>

    function sendGet(){
        $.ajax({
            url: 'test',
            type: 'get',
            data:{
                id: 1,
                name: "zhangsan"
            },
            success: function (data) {
                $("#result").html(data)

            }

        })
    }


</script>

</body>
</html>
